<!--{Atemplate tpl/header}-->

<!--{eval echo $this->Ahtml_js_aurl();}-->
<script>
var columns = {"$this->model->table":$column_json};
var url_info = "$this->Amodr-info-";
function checkall(value) {
	if(value=='0'){
		jQuery(".checkbox").attr("checked","checked");
		jQuery("#chkall_del").removeAttr("disabled","disabled");
	}
	if(value=='1'){
		jQuery(".checkbox").removeAttr("checked","checked");
		jQuery("#chkall_del").attr("disabled","disabled");
	}
	if(value=='auth'){
		var chkall = jQuery("input:checked").val();
		if(chkall == null){
			alert('请先选择');
			return false;
		}else{
			return true;
		}
	}
}

var Aform = new Apps.form('','Aform',{'add':{width:360,height:'auto'}},columns.$this->model->table,{info:'$this->Amodr-info-',save:'$this->Amodr-save-one'});
jQuery(function(){
	jQuery(".checkbox").change(function (){
		if(jQuery("input:checked").val()){
			jQuery("#chkall_del").removeAttr("disabled","disabled");
		}else{
			jQuery("#chkall_del").attr("disabled","disabled");
		}
	});
})
</script>
<div class="_customer_track">
<!--
<p>
	<input type="button" value="栏目设置" onclick="Aform.column()"/>
	<input type="button" value="添加" onclick="Aform.add()"/>
</p>-->
<div class="_data_column dis_none">
	<div class="_list">$column_html</div>
	<input type="submit" value="确定"/>
</div>
<form action="" method="POST">
<table class="-table">
	<tr>
		<td colspan="4">
			<input type="button" onclick="Aform.add()" value="添加记录"/>
		</td>
	</tr>
	<tr>
	<!--{loop $column $key $val}-->
		<th><b><a href="$page->theurl-aorder-$key,$pages->neworder$pages->other">$val</a></b></th>
	<!--{/loop}-->
		<!--<th><b>管理</b></th>-->
	</tr>
<!--{loop $list $key $val}-->
	<tr>
		<!--{eval echo $obj->for_html($key,$val,$column,$this->model);}-->
		<!--<td>
			<input type="button" onclick="Aform.add('$val[$key_name]')" value="编辑" id=""/>
			<input type="button" value="删除" onClick="javascript:if(confirm('确实要删除吗?')) Aform.del('$val[$key_name]');" />
		</td>-->
		<input type="hidden" name="save[{$key}][id]" size="1" value="$val[id]">
	</tr>
<!--{/loop}-->
</table>
</form>

<!-- 分页 -->
$pages->html
</div>

<!--{Atemplate tpl/nofooter}-->